import org.junit.Test;
import java.util.Random;
import static org.junit.Assert.*;

/**
 * Created by Administrator on 2017/10/8/008.
 */
public class MyArrayListTest<T> {
    MyArrayList list = new MyArrayList();
    T [] arr=(T [])new  Object [10];
    Random random = new Random();
    @Test
    public void add() throws Exception {
        MyArrayList list = new MyArrayList();
        list.add(34);
        list.add(4);
        list.add(5);
        list.add(3);
        list.add("wangjignhan");
        list.add("王旌含");
        System.out.println(list.toString());
    }
    @Test
    public void contains() throws Exception {
        MyArrayList list = new MyArrayList();
        boolean last = false;
        list.add(12);
        list.add(5);
        list.add(18);
        list.add("wangjignhan");
        list.add("王旌含");
        last = list.contains(5);
        assertEquals(true,last);

    }

    @Test
    public void remove() throws Exception {
        MyArrayList list = new MyArrayList();
        boolean last;
        list.add(8);
        list.add(13);
        list.add(4);
        list.add(45);
        System.out.println(list.toString());
        list.remove(4);
        list.remove(8);
        System.out.println(list.toString());
        // assertEquals(true, last);

    }
}

